﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="accountEditUser.aspx.cs" Inherits="Users_accountEditUser" %>

<%@ Register src="../UserControls/ContactSubmit.ascx" tagname="ContactSubmit" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Stylesheet" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SubNavigation" Runat="Server">
    <ul>
        <li class="first">
            <asp:HyperLink ID="lnkOverview" NavigateUrl="default.aspx" runat="server">Overview</asp:HyperLink>
        </li>
    </ul>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PageHeader" Runat="Server">
    <div style="padding-left:15px">
        <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="Edit "></asp:Label>
        <asp:Label ID="lbInformation" runat="server" Font-Size="X-Large" Text=""></asp:Label>    
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" Runat="Server">
    <div style="width: 70%; float:left; padding-right: 20px; border-right:1px solid #C0C0C0">   
        <div runat="server" id="divInformation" class="table"> 
            <div class="row">
                <div class="header">Name (First Name | Last Name)</div>
            </div>
            <div class="row">
                <div class="content" style="height: 24px">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtFirstName"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtFirstName" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                </div>
                <div class="content" style="height: 24px">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtLastName"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtLastName" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                </div>
                <%--<div class="row" style="font-size:x-small">
                    <div class="header"></div>
                    <div class="header"></div>
                </div>--%>
            </div>
            <div class="row">
                <div class="header">Email</div>
            </div>
            <div class="row">
                <div class="content">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtEmail"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                            ErrorMessage="(*)" ControlToValidate="txtEmail" ForeColor="Red" 
                            SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ErrorMessage="Bad email address" ControlToValidate="txtEmail" ForeColor="Red" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                        Display="Dynamic"></asp:RegularExpressionValidator>
                </div>
            </div>
            <div class="row">
                <div class="header">Phone</div>
            </div>
            <div class="row">
                <div class="content">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtPhone"></asp:TextBox>
                </div>
            </div>
        </div>


        <%--divBillingType--%>
        <div runat="server" id="divSentMail" class="table">
            <div class="row">
                <div class="content">
                    <asp:CheckBox ID="chkSentMail" runat="server" Text=" Send new user welcome letter?" />                    
                </div>
            </div>
        </div>


        <div runat="server" id="divRoleType" class="table">
            <div class="row">
                <div class="header"><b>Select Control Panel Role</b><hr /></div>
                <div style="clear: both;">
                    <asp:Repeater ID="rptRole" runat="server">
                        <HeaderTemplate>
                            <ul>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                <asp:HiddenField ID="hdnRoleId" Value='<%#Eval("Id") %>' runat="server" />
                                <div class="row"><asp:CheckBox ID="chkRole" CssClass="textbox" Checked='<%#Eval("IsAllow")%>' runat="server" Text='<%# " <b>" + Eval("Name") + "</b> - " + Eval("Description") %>' /></div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </div>
            <div class="row">
                <div class="header"><b>Select Server Role</b><hr /></div>
                <div style="clear: both;">
                    <asp:Repeater ID="rptServerRole" runat="server">
                        <HeaderTemplate>
                            <ul>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                <asp:HiddenField ID="hdnRoleId" Value='<%#Eval("Id") %>' runat="server" />
                                <div class="row"><asp:CheckBox ID="chkServerRole" CssClass="textbox" Checked='<%#Eval("IsAllow")%>' runat="server" Text='<%# " <b>" + Eval("Name") + "</b> - " + Eval("Description") %>' /></div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </div>
        </div>   
        <div style="padding-left:15px;padding-bottom:10px">
            <asp:Button ID="btSave" runat="server" Text="Save" Height="30px" Width="80px" onclick="btSave_Click" /> &nbsp;or 
            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="default.aspx">Cancel</asp:HyperLink>  
        </div>     
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="SideBar" Runat="Server">
    <div align="left" style="width:25%; float:right;padding-left:20px">
        <div>Options</div>
        <hr />
            <asp:LinkButton ID="lbtnDisableUser" runat="server" 
            onclick="lbtnDisableUser_Click">Disable User</asp:LinkButton>
    </div>
</asp:Content>

